/*
 * Copyright (c) 2018. czmc All Rights Reserved.
 * Author: czmc
 * Email: zxc6355533@163.com
 * Encoding: UTF-8
 */

package top.stime21.myneighbours.module.login

import io.reactivex.Observable
import top.stime21.framework.mvp.MvpContract
import top.stime21.myneighbours.data.dto.BaseResult
import top.stime21.myneighbours.data.dto.UserResult

/**
 * Author: czmc  Email: @tuwan21.com
 * Version:	1.0  Date:3/3/2018
 */
interface LoginContract : MvpContract {

    interface View : MvpContract.View {
        /**
         * 登录成功
         */
         fun onLoginSuccess()

        /**
         * 短信计时
         */
         fun onSMSCount(second: Long, done: Boolean)

    }

    interface Presenter : MvpContract.Presenter {
        /**
         * 发送验证码:发送前会校验
         */
         fun sendSms(mobile: String)

        /**
         * 登录
         */
         fun login(mobile: String, vcode: String)
    }

    interface Model : MvpContract.Model {
        /**
         * 发送验证码:发送前会校验
         */
        fun sendSms(mobile: String): Observable<BaseResult>
        /**
         * 登录
         */
        fun login(mobile: String, vcode: String): Observable<UserResult>

    }
}
